package com.zmn.brs.model.entity.common;


import lombok.*;

import java.io.Serializable;

/**
 * 类描述：json项解析
 *
 * @author liuyong
 * @since 2021/07/16 12:00
 */
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class JsonItem implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * text
     */
    private String text;
    /**
     * value
     */
    private String value;

    /**
     * 来源Id
     */
    private Integer sourceId;

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        JsonItem other = (JsonItem) obj;
        if (!value.equals(other.value)) {
            return false;
        }
        /*if(text == null){
            if(other.text != null){
                return false;
            }
        }else if(!text.equals(other.text)){
            return false;
        }*/
        return true;
    }
}
